﻿{% extends 'base.html' %}
{% block content %}
  <section class="section">
    <div class="container">
      <div class="content">
        <div class="category">
          <h4 class="title">关键词：{{ keyword }}</h4>
          <p class="count">共{{ article_list.count }}篇</p>
        </div>
        <section class="article-wrap">
          {% if pages.object_list %}
            {% for article in pages.object_list %}
              <article class="article-list">
                <a href="{{ article.get_absolute_url }}"
                   title="{{ article.title }}"
                   class="thumbnail-wrap">
                  <img src="{{ article.img.url }}"
                       alt="{{ article.title }}" class="thumbnail"/>
                </a>
                <div class="article-inner">
                  <h3 class="title">
                    <a href="{{ article.get_absolute_url }}"
                       title="{{ article.title }}">{{ article.title }}
                    </a>
                  </h3>
                  <div class="summary">
                    {{ article.excerpt }}
                  </div>
                  <div class="article-info">
                    <div class="meta">
                    <span class="label label-info">
                      <a href="{% url 'blog:category' article.category.navigation.pk article.category.pk %}">
                        {{ article.category.name }}
                      </a>
                    </span>
                      <span>
                      <i class="fa fa-clock-o"></i>
                      {{ article.created_time }}
                    </span>
                      <span>
                      <i class="fa fa-eye"></i>
                      {{ article.views }}
                    </span>
                      <span>
                      <i class="fa fa-commenting-o"></i>
                      {{ article.comment_set.all.count }}
                    </span>
                    </div>
                    <a class="label label-info" href="{{ article.get_absolute_url }}">
                      阅读详情
                    </a>
                  </div>
                </div>
              </article>
            {% endfor %}
            {% include 'paginator.html' %}
          {% else %}
            <p>╮(╯﹏╰)╭找不到关于你想要搜索的关于{{ keyword }}的内容</p>
          {% endif %}
        </section>
      </div>
      <div class="sidebar">
        {% include 'sidebar.html' %}
      </div>
  </section>
{% endblock %}